Skip to content

feat(mcp): register loopover_refresh_repo_docs as a local stdio tool#7974

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:feat/refresh-repo-docs-stdio-tool-7754
Jul 22, 2026
Merged

feat(mcp): register loopover_refresh_repo_docs as a local stdio tool#7974
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:feat/refresh-repo-docs-stdio-tool-7754

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

Summary

Closes #7754loopover_refresh_repo_docs has a remote MCP tool (src/mcp/server.ts) and a maintain refresh-docs CLI command, but no local stdio MCP tool registration. #6743 added the REST route + CLI but never the matching stdio tool.

What changed (packages/loopover-mcp/bin/loopover-mcp.ts)

  • A registerStdioTool("loopover_refresh_repo_docs", …) block, placed next to loopover_get_maintainer_noise, mirroring the sibling proxy pattern — a thin POST of the same {repoBase}/repo-docs/refresh route the maintain refresh-docs CLI already calls, with an empty body (the route only ever opens a PR — never merges/commits — so there's no create-safety flag to forward).
  • Input reuses ownerRepoShape (matching the remote refreshRepoDocsShape). Description via stdioToolDescription(...) + a STDIO_TOOL_DESCRIPTORS entry (category: "maintainer").

Testing / coverage

No REST/OpenAPI/CLI-surface change — ui:openapi:check, command-reference:check, docs/manifest drift all clean; build:mcp clean.

(Supersedes #7969, which was base-conflicted when sibling stdio-tool PRs merged mid-review — rebased onto current main.)

loopover_refresh_repo_docs has a remote MCP tool (src/mcp/server.ts) and a
`maintain refresh-docs` CLI command, but no local stdio MCP tool registration.
operator using the local MCP server couldn't call it.

Adds the registerStdioTool block following the existing sibling pattern -- a thin
POST proxy of the same {repoBase}/repo-docs/refresh route the CLI hits, with an
empty body (the route only ever opens a PR -- never merges/commits -- so there is
no create-safety flag to forward). Input reuses ownerRepoShape (matching the remote
refreshRepoDocsShape); description via stdioToolDescription; category "maintainer".

test/unit/mcp-cli-refresh-repo-docs.test.ts drives it in-process (JSONbored#7764 entrypoint
guard) so the registration + handler get real Codecov coverage. Count 94 -> 95.

Closes JSONbored#7754
@real-venus
real-venus requested a review from JSONbored as a code owner July 22, 2026 00:58
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 22, 2026
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-22 01:06:03 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR registers a thin stdio MCP tool that proxies POST to the existing `{repoBase}/repo-docs/refresh` route, mirroring the sibling `registerStdioTool` pattern used elsewhere in this file (e.g. `loopover_get_maintainer_noise`) with the same `ownerRepoShape` input. It's a small, well-scoped addition tied to a specific gap (#7754: remote tool + CLI existed but no stdio mirror), with in-process test coverage that asserts the exact POST path and response shape, plus the tool-count invariant bump to 97 kept in sync across both assertion sites in mcp-tool-rename-aliases.test.ts. The handler is branch-free so the single test exercises it fully; I don't see a logic defect.

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:1722 — the handler param is typed `{ owner, repo }: any`; the sibling tools in this file appear to follow the same pattern already so this is consistent, but consider a proper zod-inferred type if you ever tighten this file's typing.
  • The external scan flagged test/unit/mcp-cli-refresh-repo-docs.test.ts:31 as a potential secret — it's just the literal fixture string `"in-process-token"` used the same way other mcp-cli-*.test.ts harnesses set LOOPOVER_API_TOKEN, so this is a false positive, not a real leak.
  • The PR description says the linked-issue coverage is 'partial' per the external brief — worth double-checking Register loopover_refresh_repo_docs as a local stdio MCP tool #7754's acceptance criteria are fully closed by this diff before merge.
  • Nothing to change in the diff itself; the pattern match to loopover_get_maintainer_noise is exactly right and the test harness reuse (startFixtureServer/InMemoryTransport) is idiomatic for this suite.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7754
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 112 registered-repo PR(s), 50 merged, 19 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 112 PR(s), 19 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_refresh_repo_docs following the described sibling pattern, reusing stdioToolDescription and proxying the same POST /repo-docs/refresh route without duplicating HTTP logic, plus updates the tool-count invariant and adds a dedicated in-process test.

Review context
  • Author: real-venus
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Python, Rust, CSS, MDX, Svelte, Swift
  • Official Gittensor activity: 112 PR(s), 19 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 4dccaa6 into JSONbored:main Jul 22, 2026
10 checks passed
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.92%. Comparing base (84a7878) to head (8ff2ec1).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7974      +/-   ##
==========================================
- Coverage   91.89%   81.92%   -9.97%     
==========================================
  Files         738       94     -644     
  Lines       75706    23945   -51761     
  Branches    23011     4602   -18409     
==========================================
- Hits        69573    19618   -49955     
+ Misses       5041     4131     -910     
+ Partials     1092      196     -896     
Flag Coverage Δ
shard-1 11.70% <100.00%> (-47.04%) ⬇️
shard-2 0.00% <0.00%> (-46.91%) ⬇️
shard-3 0.00% <0.00%> (-56.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-mcp/bin/loopover-mcp.ts 11.70% <100.00%> (-5.07%) ⬇️

... and 644 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register loopover_refresh_repo_docs as a local stdio MCP tool

1 participant